import axios from "axios";

const request = axios.create({
    baseURL: '/api',
    timeout: 8000
});

request.interceptors.request.use(
    (config: any) => {
        return config;
    },
    (err: any) => {
        return Promise.reject(err);
    })

request.interceptors.response.use(
    (res: any) => {
        return res;
    },
    (err) => {
        return Promise.reject(err);
    })

export default request;